1. Field of the Invention
The present invention relates to an apparatus, a method, and a terminal apparatus for maintaining a connection in communications that are being relayed.
2. Description of the Related Art
These years, the session initiation protocol (SIP) has been widely known as a signaling protocol used for controlling and relaying communications between communication devices. A communication system adopting the SIP (SIP system) includes an SIP proxy as a server mediating communications between SIP terminals, which are terminal apparatuses. Security is protected commonly by adopting a transport layer security (TLS) protocol as a transport protocol for connecting the SIP terminals and the SIP proxy. A set of SIP terminals and an SIP proxy is designated as an SIP entity.
An SIP terminal is connected to a specific SIP proxy and always sends and receives SIP messages by way of this particular SIP proxy. Such a SIP proxy is called an outbound proxy.
For instance, it is assumed that an outbound proxy for SIP terminal A is SIP proxy A and an outbound proxy for SIP terminal B is SIP proxy B. An SIP message sent from SIP terminal A to SIP terminal B always leaves SIP terminal A, passes through SIP proxy A and SIP proxy B, and is transferred to SIP terminal B. Such a communication model is designated generally as an SIP trapezoidal communication model.
In an SIP entity in a conventional SIP system, a transaction or dialog period, which is a period of basic message exchange in accordance with the SIP, is brought into synchronism with a TLS connection maintaining period.
The synchronization between the transaction period and the TLS connection maintaining period is explained in detail below. In general, the SIP messages are exchanged in units of transactions. A transaction includes an SIP request message that an SIP transmitting terminal sends to an SIP receiving terminal and an SIP response message that the SIP receiving terminal sends back to the SIP transmitting terminal upon receipt of the SIP request message.
When a TLS connection is maintained in units of transactions, an SIP entity detects a transaction of an SIP message, and establishes, when an SIP request message is transmitted, a TLS connection with the SIP entity to which the SIP request message is to be transferred. After an SIP response message is transmitted, the TLS connection to the SIP entity to which the message is transferred is canceled.
Next, the synchronization between the dialog period and the TLS connection maintaining period is explained in detail below. A dialog indicates a relationship between SIP terminals starting when a media session is brought about by an SIP message between the SIP transmitting terminal and the SIP receiving terminal and maintained until the media session ends. At the beginning of the media session, the SIP terminals exchange SIP INVITE messages. At the end of the media session, the SIP terminals exchange SIP BYE messages.
When the TLS connection is to be maintained in units of dialogs, an SIP entity detects an SIP dialog, and establishes the TLS connection to an SIP entity to which an SIP INVITE message is transferred at the time of the message exchange. The TLS connection is maintained during the dialog. After an SIP BYE message is exchanged, the TLS connection to the SIP entity to which the message is transferred is canceled.
In a conventional system, the TLS connection maintaining period is brought into synchronism with the transaction period or the dialog period for SIP messages.
Memories and other calculation resources are taken up while a TLS connection is established. Especially for an SIP proxy that has connections with a number of SIP terminals, it becomes difficult to maintain all the TLS connections with the SIP terminals. On the other hand, because it takes time to establish a TLS connection, it is preferable to maintain as many of the TLS connections as possible to reduce delay time in transferring SIP messages. Thus, a trade-off between a reduction in resource consumption and a reduction in transfer delay has to be made when establishing TLS connections.
For instance, when there are not so many SIP terminals connected to an SIP proxy, resource consumption does not raise any issue. Hence, even after a transaction or a dialog is completed, the TLS connection may still be maintained. In reality, such implementations are often offered.
In contrast, when a number of SIP terminals are connected to a single SIP proxy, the SIP proxy may not be able to keep all the TLS connections, depending on the use of SIP applications running on the SIP terminals. If this is the case, the SIP proxy selects, for example, the TLS connection in the least use among the ones that are currently maintained, and cancels this TLS connection. The TLS connections of frequent use can be thereby maintained.
J. Rosenberg et al. specify in “RFC 3261, SIP: Session Initiation Protocol”, [online], June 2002, retrieved from the Internet: <URL: http://www.ietf.org/rfc/rfc3261.txt> (hereinafter, “Document 1”) that the connection should be maintained for a certain period of time and that, when the connection is terminated at the transport from which an SIP message is transmitted, a connection should be newly established. More specifically, it is indicated that the connection at the transport for transferring the SIP message (TCP or TLS connection) is maintained preferably for 64×T1 seconds after the last message is transmitted/received by way of the established connection. T1 denotes a predicted value for a round trip time (RTT), whose default value is 500 milliseconds.
In addition, Document 1 indicates that, when sending an SIP response message, the connection established when the SIP request message is sent out is used to transfer the SIP response message and that, if this connection has been terminated, a connection should be newly established.
When an SIP entity wants a particular TLS connection to be maintained, the SIP entity is allowed to make a request of maintaining the connection to the connected SIP entity by, for example, sending a keep-alive message thereto.
There is a problem in the method suggested by Document 1 and others, however, that all the connection channels among the SIP entities cannot be suitably maintained in an SIP trapezoidal communication model. For instance, a method incorporating a keep-alive message is intended mainly to maintain a single TLS connection between two SIP entities only. Thus, in this method the maintenance of all three TLS connections established among four SIP entities in a SIP trapezoidal communication model cannot be requested.
Furthermore, the method adopting keep-alive messages increases the amount of traffic, and thus the method is unusable for an SIP proxy to which multiple SIP terminals are connected.
In addition, with the method determining which TLS connection to be maintained based on frequency of use, connections may not be properly maintained if TLS connections to be maintained should not be determined in accordance with frequency of use only. For instance, there are cases in which a connection is terminated for a transaction or a dialog with an SIP application that is not in frequent use but requires high responsivity, while an unnecessary TLS connection is maintained.